package com.wc5818.other;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSONObject;
import com.wc5818.other.renrunyun.RRY;

/****
 * 
 * @author yqb
 * 
 *
 */

@RestController
@RequestMapping("/other/rry/api")
public class RRYApi {

	/***
	 * RRY
	 */
	RRY rry = new RRY();

	/**
	 * 获取token
	 * 
	 * @param uname
	 * @param secret
	 * @return
	 */
	@RequestMapping(value = "getRRYtoken", method = RequestMethod.GET)
	public ToKenCell getRRYtoken() {

		return rry.getToken();

	}
	
	/***
	 * 验证身份证
	 * @param name
	 * @param idCard
	 * @return
	 */
	@PostMapping(value = "getidcardverify", produces = "application/json;charset=utf-8")
	public String getidcardverify(String name,String  idCard) {
		
		//@RequestParam("bankcard") String bankcard
		System.out.println("name:" + name + "idCard:" + idCard);
		
		return rry.getidcardverify(name, idCard);
		
		
	}
	
	
	/***
	 * 验证银行卡
	 * @param name
	 * @param idCard
	 * @param mobile
	 * @param bankcard
	 * @return
	 */
	@PostMapping(value = "getbankCard3verify",produces = "application/json;charset=utf-8")
	public String getbankCard3verify(String name, String idCard, String mobile, String bankcard) {
		
		
		return rry.getbankCard3verify(name, idCard, mobile, bankcard);
	}
	
	/***
	 * 验证驾驶证
	 * @param name
	 * @param idCard
     * 
	 */
	@PostMapping(value = "getdriverinfo",produces = "application/json;charset=utf-8")
	public String getdriverinfo(String name, String idCard) {
		
		
		return rry.getdriverinfo(name, idCard);
	}
	
	
	
	/***
	 * 多头借贷
	 * @param name
	 * @param idCard
	 * @param mobile
	 * @return
	 */
	@PostMapping(value = "getbulllendingverify",produces = "application/json;charset=utf-8")
	public String getbulllendingverify(String name, String idCard, String mobile) {
		
		
		return rry.getbulllendingverify(name, idCard, mobile);
	}
	
	
	
	/***
	 ****
	 * getlawquery
	 *
	 * 个人涉诉
	 * @param name
	 * @param idCard
	 * @return
	 */
	@PostMapping(value = "getlawquery",produces = "application/json;charset=utf-8")
	public String getlawquery(String name, String idCard) {
		
		
		return rry.getlawquery(name, idCard);
	}
	
	//
	
	/***
	 * 银行卡归属地
	 * @param bankcard
	 
	 * @return
	 */
	@GetMapping(value = "getbankCardOwnerquery",produces = "application/json;charset=utf-8")
	public String getbankCardOwnerquery(@RequestParam("bankcard") String bankcard) {
		
		
		return rry.getbankCardOwnerquery(bankcard);
		
		
	}
	
	
	
	
	
	

}
